import { Schema, model } from '..'

export interface IPlayer {
    _id: string
    username: string
    token: string
}

const PlayerSchema = new Schema<IPlayer>({
    username: {
        type: String,
        required: true,
        unique: true,
    },
    token: {
        type: String,
        required: true,
        unique: true,
    },
})

const PlayerModel = model<IPlayer>('player', PlayerSchema)

export default PlayerModel
